-- GENERATED SPELL FOR [Greater Shadowbat] --


function spell0_16174(pUnit, Event) --@Sonic Blast,n/a--
pUnit:FullCastSpellOnTarget(29300,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16174', 5310, 1)
end

function spell1_16174(pUnit, Event) --@Wing Beat,Self--
pUnit:FullCastSpellOnTarget(29303,pUnit)
pUnit:RegisterEvent('Sorts_16174', 8266, 1)
end

function Sorts_16174(pUnit, Event)
local choix_sorts_16174 = math.random(0, 1)
if choix_sorts_16174 == 0 then
pUnit:RegisterEvent('spell0_16174', 1, 1)
end
if choix_sorts_16174 == 1 then
pUnit:RegisterEvent('spell1_16174', 1, 1)
end
end

function mob16174_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16174', math.random(1500, 3000), 1)
end

function mob16174_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16174_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16174_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16174, 1, 'mob16174_Action')
RegisterUnitEvent(16174, 2, 'mob16174_Leave')
RegisterUnitEvent(16174, 3, 'mob16174_Kill')
RegisterUnitEvent(16174, 4, 'mob16174_Die')
